﻿<%@ Page Language="C#" MasterPageFile="~/cms.master" AutoEventWireup="true" CodeFile="AddUser.aspx.cs"
    Inherits="AddUser" Title="<%$Resources:Language,CmsAddingUserTitle %>" %>

<%@ Register Src="~/controls/ctrlWait.ascx" TagName="ctrlWait" TagPrefix="ctrl" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="Server">
    <h2>
        <%=Resources.Language.AddingNewUser %></h2>
    <ctrl:ctrlWait ID="ctrlWait" runat="server" />
    <center>
        <asp:ScriptManagerProxy runat="server" ID="smpAddUser">
        </asp:ScriptManagerProxy>
        <asp:UpdatePanel runat="server" ID="upAddUser">
            <ContentTemplate>
                <div id="cmsWizard">
                    <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" BackColor="#F7F6F3" BorderColor="#E6E2D8"
                        BorderStyle="Solid" BorderWidth="1px" CreateUserButtonText="<%$Resources:Language,AddUser %>"
                        FinishCompleteButtonText="<%$Resources:Language,Confirm %>" FinishPreviousButtonText="<%$Resources:Language,Return %>"
                        OnCreatedUser="CreateUserWizard1_CreatedUser" StartNextButtonText="<%$Resources:Language,Next %>"
                        CancelDestinationPageUrl="Users.aspx" CancelButtonText="<%$ Resources:Language, Cancel %>"
                        StepNextButtonText="<%$Resources:Language,Next %>" StepPreviousButtonText="<%$Resources:Language,Return %>"
                        LoginCreatedUser="False" Width="400px">
                        <WizardSteps>
                            <asp:WizardStep runat="server" ID="WizardStep1" Title="<%$Resources:Language,AddingNewUser %>">
                                <table border="0">
                                    <tr>
                                        <th colspan="2">
                                            <%=Resources.Language.AccountWizard %>
                                        </th>
                                    </tr>
                                    <tr>
                                        <td>
                                            <span>
                                                <%=Resources.Language.CmsAccountWizardMessage1 %>. </span>
                                        </td>
                                    </tr>
                                </table>
                            </asp:WizardStep>
                            <asp:WizardStep runat="server" ID="WizardStep2" Title="role">
                                <table>
                                    <tbody>
                                        <tr>
                                            <th>
                                                <%=Resources.Language.UserPermissions %>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td>
                                                <span>
                                                    <%=Resources.Language.CmsAccountWizardMessage2 %>:<br />
                                                    <br />
                                                </span>
                                                <asp:RadioButtonList ID="rblRoles" runat="server" CssClass="cmsRolesList">
                                                </asp:RadioButtonList>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <asp:Label runat="server" ForeColor="Red" ID="lbWarrning"></asp:Label>
                            </asp:WizardStep>
                            <asp:CreateUserWizardStep runat="server" ID="CreateUserWizardStep1">
                                <ContentTemplate>
                                    <table>
                                        <tbody>
                                            <tr>
                                                <th colspan="2">
                                                    <%=Resources.Language.AddingNewAccount %>
                                                </th>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName"><%=Resources.Language.UserName %>:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ValidationGroup="CreateUserWizard1"
                                                        ToolTip="<%$Resources:Language,UserNameRequired %>" ErrorMessage="<%$Resources:Language,UserNameRequired %>"
                                                        ControlToValidate="UserName">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password"><%=Resources.Language.Password %>:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ValidationGroup="CreateUserWizard1"
                                                        ToolTip="<%$Resources:Language,PasswordRequired %>" ErrorMessage="<%$Resources:Language,PasswordRequired %>"
                                                        ControlToValidate="Password">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword"><%=Resources.Language.PasswordConfirm %>:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ValidationGroup="CreateUserWizard1"
                                                        ToolTip="<%$Resources:Language,PasswordConfirmRequired %>" ErrorMessage="<%$Resources:Language,PasswordConfirmRequired %>"
                                                        ControlToValidate="ConfirmPassword">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email"><%=Resources.Language.Email %>:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Email" runat="server"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ValidationGroup="CreateUserWizard1"
                                                        ToolTip="<%$Resources:Language,EmailRequired %>" ErrorMessage="<%$Resources:Language,EmailRequired %>"
                                                        ControlToValidate="Email">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question"><%=Resources.Language.QuestionSequrity %>:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Question" runat="server"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ValidationGroup="CreateUserWizard1"
                                                        ToolTip="<%$Resources:Language,QuestionSequrityRequired %>" ErrorMessage="<%$Resources:Language,QuestionSequrityRequired %>"
                                                        ControlToValidate="Question">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer"><%=Resources.Language.Answer %>:</asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Answer" runat="server"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="AnswerRequired" runat="server" ValidationGroup="CreateUserWizard1"
                                                        ToolTip="<%$Resources:Language,AnswerSequrityRequired %>" ErrorMessage="<%$Resources:Language,AnswerSequrityRequired %>"
                                                        ControlToValidate="Answer">*</asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center" colspan="2">
                                                    <asp:CompareValidator ID="PasswordCompare" runat="server" ValidationGroup="CreateUserWizard1"
                                                        ErrorMessage="<%$Resources:Language,MustConfirmPassword %>" ControlToValidate="ConfirmPassword"
                                                        Display="Dynamic" ControlToCompare="Password"></asp:CompareValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="color: red" align="center" colspan="2">
                                                    <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </ContentTemplate>
                            </asp:CreateUserWizardStep>
                            <asp:CompleteWizardStep runat="server" ID="CompleteWizardStep1">
                                <ContentTemplate>
                                    <table>
                                        <tbody>
                                            <tr>
                                                <th colspan="2">
                                                    <%=Resources.Language.Confirmation %>
                                                </th>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <br />
                                                    <%=Resources.Language.CmsAccountWizardMessage3 %>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 246px; height: 22px; text-align: center" colspan="2">
                                                    <br />
                                                    <asp:Button ID="ContinueButton" OnClick="ContinueButton_Click" runat="server" Text="<%$Resources:Language,Finish %>">
                                                    </asp:Button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </ContentTemplate>
                            </asp:CompleteWizardStep>
                        </WizardSteps>
                        <SideBarStyle BackColor="#5D7B9D" BorderWidth="0px" Font-Size="0.9em" VerticalAlign="Top">
                        </SideBarStyle>
                        <TitleTextStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True"></TitleTextStyle>
                        <HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" ForeColor="White" HorizontalAlign="Center"
                            Font-Size="0.9em" Font-Bold="True"></HeaderStyle>
                        <StepNavigationTemplate>
                            <asp:Button runat="server" ID="StepPreviousButton" Text="<%$Resources:Language,Return %>"
                                CommandName="MovePrevious" CausesValidation="False"></asp:Button>
                            <asp:Button runat="server" ID="StepNextButton" Text="<%$Resources:Language,Next %>"
                                CommandName="MoveNext"></asp:Button>
                            <asp:Button runat="server" ID="CancelButton" Text="<%$Resources:Language,Cancel %>"
                                CommandName="Cancel"></asp:Button>
                        </StepNavigationTemplate>
                    </asp:CreateUserWizard>
                    &nbsp;
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </center>
</asp:Content>
